﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using TpBaseObjects.Base;

namespace TpBaseObjects.Objects {
    
    public class RechtsformObject : MyBaseModel {

        #region Members

        private int rechtsformKey;
        private string rechtsform;

        #endregion

        #region Constructor

        public RechtsformObject() {
        }

        #endregion

        #region Properties

        [DataMember]
        public string Rechtsform {
            get { return this.rechtsform; }
            set {
                if (this.rechtsform == value) {
                    return;
                }
                this.rechtsform = value;
                OnPropertyChanged(() => Rechtsform);
            }
        }

        [DataMember]
        public int RechtsformKey {
            get { return this.rechtsformKey; }
            set {
                if (this.rechtsformKey == value) {
                    return;
                }
                this.rechtsformKey = value;
                OnPropertyChanged(() => RechtsformKey);
            }
        }

        #endregion

        #region Overides

        public override string ToString() {
            return this.Rechtsform + " (" + this.RechtsformKey.ToString() + ")";
        }
        
        #endregion

    }
}
